aboutsummaryrefslogtreecommitdiff
path: root/pages/anime/[...id].js
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-04-19 22:36:41 +0700
committerFactiven <[email protected]>2023-04-19 22:36:41 +0700
commit7d8a77302a5a637d00e838359e05becbda63a77d (patch)
tree282b22244c5b1c010ab4e44e65573a35e4d88b41 /pages/anime/[...id].js
parentUpdate [...id].js (diff)
downloadmoopa-7d8a77302a5a637d00e838359e05becbda63a77d.tar.xz
moopa-7d8a77302a5a637d00e838359e05becbda63a77d.zip
Update [...id].js
Diffstat (limited to 'pages/anime/[...id].js')
-rw-r--r--pages/anime/[...id].js13
1 files changed, 3 insertions, 10 deletions
diff --git a/pages/anime/[...id].js b/pages/anime/[...id].js
index f9c522d..d5db21e 100644
--- a/pages/anime/[...id].js
+++ b/pages/anime/[...id].js
@@ -23,7 +23,6 @@ export default function Himitsu({
progress,
status,
lastPlayed,
- nextAir,
}) {
const [showText, setShowtext] = useState(false);
const [load, setLoad] = useState(true);
@@ -44,6 +43,7 @@ export default function Himitsu({
setLang(false);
}
+ const nextAir = info.nextAiringEpisode;
// console.log(time);
useEffect(() => {
@@ -553,7 +553,7 @@ export async function getServerSideProps(context) {
}
const ress = await fetch(
- `https://ani-api-eight.vercel.app/kuramanime/search?query=${
+ `https://ani-api-eight.vercel.app/nanime/search?query=${
info.title.romaji || info.title?.english
}`
);
@@ -580,7 +580,7 @@ export async function getServerSideProps(context) {
slug = anime[0]?.slug;
const inf = await fetch(
- `https://ani-api-eight.vercel.app/kuramanime/anime/${slug}`
+ `https://ani-api-eight.vercel.app/nanime/anime/${slug}`
);
const dataInf = await inf.json();
@@ -590,7 +590,6 @@ export async function getServerSideProps(context) {
let progress = null;
let status = null;
let lastPlayed = null;
- let nextAir = null;
if (session) {
const response = await fetch("https://graphql.anilist.co/", {
@@ -637,10 +636,6 @@ export async function getServerSideProps(context) {
media {
id
status
- nextAiringEpisode {
- episode
- timeUntilAiring
- }
title {
english
romaji
@@ -679,7 +674,6 @@ export async function getServerSideProps(context) {
const gut = git?.find((item) => item?.media.id === parseInt(info.id));
if (gut) {
- nextAir = gut.media.nextAiringEpisode;
progress = gut?.progress;
if (gut.status === "CURRENT") {
status = "Watching";
@@ -719,7 +713,6 @@ export async function getServerSideProps(context) {
progress: progress || null,
status: status,
lastPlayed: lastPlayed || null,
- nextAir: nextAir || null,
},
};
}